<page-header></page-header>

<p>
  The CSS grid's breakpoints are the same as the default
  <a href="https://github.com/angular/flex-layout/wiki/Responsive-API#responsive-features">
    breakpoints for flex-layout</a>.
  It's very useful for advanced layout with ngx-formly. You can check the dynamic form's
  <a routerLink="/forms/dynamic">advanced layout example</a>.
</p>

<mat-card>
  <mat-card-header>
    <mat-card-title>All breakpoints</mat-card-title>
  </mat-card-header>

  <mat-card-content>
    <div class="p-x-8 text-center">
      <div class="row">
        <div class="col">.col</div>
        <div class="col">.col</div>
        <div class="col">.col</div>
        <div class="col">.col</div>
      </div>
      <div class="row">
        <div class="col-8">.col-8</div>
        <div class="col-4">.col-4</div>
      </div>
    </div>
  </mat-card-content>
</mat-card>

<mat-card>
  <mat-card-header>
    <mat-card-title>Stacked to horizontal</mat-card-title>
  </mat-card-header>

  <mat-card-content>
    <div class="p-x-8 text-center">
      <div class="row">
        <div class="col-sm-8">.col-sm-8</div>
        <div class="col-sm-4">.col-sm-4</div>
      </div>
      <div class="row">
        <div class="col-sm">.col-sm</div>
        <div class="col-sm">.col-sm</div>
        <div class="col-sm">.col-sm</div>
      </div>
    </div>
  </mat-card-content>
</mat-card>

<mat-card>
  <mat-card-header>
    <mat-card-title>Mix and match</mat-card-title>
  </mat-card-header>

  <mat-card-content>
    <div class="p-x-8 text-center">
      <!-- Stack the columns on mobile by making one full-width and the other half-width -->
      <div class="row">
        <div class="col-md-8">.col-md-8</div>
        <div class="col-6 col-md-4">.col-6 .col-md-4</div>
      </div>

      <!-- Columns start at 50% wide on mobile and bump up to 33.3% wide on desktop -->
      <div class="row">
        <div class="col-6 col-md-4">.col-6 .col-md-4</div>
        <div class="col-6 col-md-4">.col-6 .col-md-4</div>
        <div class="col-6 col-md-4">.col-6 .col-md-4</div>
      </div>

      <!-- Columns are always 50% wide, on mobile and desktop -->
      <div class="row">
        <div class="col-6">.col-6</div>
        <div class="col-6">.col-6</div>
      </div>
    </div>
  </mat-card-content>
</mat-card>
